package com.grf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.EnableKafka;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {

    @Autowired
    KafkaTemplate kafkaTemplate;

    @ResponseBody
    @RequestMapping("/send")
    public String getUser() {
        kafkaTemplate.send("test", "test");
        return "success";
    }

}
